package com.gnerv.pabu.basic.feign.config;

import feign.Client;
import feign.Contract;
import feign.Feign;
import feign.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignConfiguration {

    @Bean
    public Feign.Builder feignBuilder() {
        Client trustSslSockets = new Client.Default(TrustingSSLSocketFactory.get(), null);
        return Feign.builder().client(trustSslSockets);
    }

    @Bean
    Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;
    }

}
